package Loglj;

import java.sql.*;

public class Ljmysql{
	
	public static Connection getConnection()throws Exception{
		Class.forName("com.mysql.jdbc.Driver");
		Connection conn=DriverManager.getConnection("jdbc:mysql://localhost/log?Unicode=ture&charaterEncoding=UTF-8","root","root");
		return conn;
	}
	
	public static void closeConnection(Connection con)throws Exception{
		if(con != null){
			con.close();
			
		}
	}
}